package com.example.mapp;

import com.example.entity.IndexEcharts;
import com.example.mapp.buildSql.IndexEchartsMappSql;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;
import java.util.Map;

@Mapper
public interface IndexEchartsMapp {


    @Select(" select key_name AS 'keyName' from index_echarts")
    List<IndexEcharts> findList();

    /**
     * 辖区内电梯类型分布
     *
     * @return
     * @throws Exception
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "countTypeDistribType")
    List<Map<String, Object>> countTypeDistribType() throws Exception;

    /**
     * 市
     * @param id
     * @return
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "countTypeDistribTypeCity")
    List<Map<String, Object>> countTypeDistribTypeCity(String id);

    /**
     * 局
     * @param id
     * @return
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "countTypeDistribTypeArea")
    List<Map<String, Object>> countTypeDistribTypeArea(String id);

    /**
     * 维保-->市数据
     * @param
     * @param
     * @return
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "maintenanceRanksCity")
    List<Map<String, Object>> maintenanceRanksCity(Map map);

    /**
     * 市数据--->用户排名
     * @param
     * @param
     * @retur
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "maintenanceUserRanksCity")
    List<Map<String, Object>> maintenanceUserRanksCity(Map map);

    /**
     * 局、分局---->维保单位排名
     * @param paramap
     * @return
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "maintenanceRanksBranch")
    List<Map<String,Object>> maintenanceRanksBranch(Map<String, Object> paramap);

    /**
     * 局、分局---->使用单位排名
     * @param paramap
     * @return
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "maintenanceRanksBranchUse")
    List<Map<String,Object>> maintenanceRanksBranchUse(Map<String, Object> paramap);

    /**
     * 局、分局---->维保单位用户排名
     * @param paramap
     * @return
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "maintenanceRanksBranchUser")
    List<Map<String,Object>> maintenanceRanksBranchUser(Map<String, Object> paramap);

    /**
     * 局、分局---->使用单位用户排名
     * @param paramap
     * @return
     */
    @SelectProvider(type = IndexEchartsMappSql.class, method = "maintenanceRanksBranchUseUser")
    List<Map<String,Object>> maintenanceRanksBranchUseUser(Map<String, Object> paramap);
}
